
module: {
    rules: [
        {
            test: /\.css$/,
            use: [
                'style-loader',
                {
                    loader: 'css-loader',
                    options: {
                        importLoaders: 1,
                        esModule: false
                    }
                },
                'postcss-loader'
            ]
        },
        {
            test: /\.(png|svg|gif|jpe?g)$/,
            use: [
                loader: 'url-loader',
                options: {
                    name: 'img/[name].[hash:6].[ext]',
                    limit: 25 * 1024
                }
            ]
        },
        {
            test: /\.(png|svg|gif|jpe?g)$/,
            type: 'asset/resource'
        }
    ]
}

/**
*url-loader base64 uri 文件当中，减少请求次数
*file-loader 将资源拷贝至指定的目录，分开请求
*url-loader 内部其实也可以调用file-loader
*limit
*/

/*asset module type 
asset/resource ---> file-loader
asset/inline ---> url-loader
asset/source ---> raw-loader
asset*/